<template>
    <view class="content">
        <!-- 积分 订单详情 -->
        <view class="bg"></view>
        <view class="top">
            <view class="add-text">
                <text class="add-icon">地址</text>
                <text class="add">高新区硅谷大街与荷园路交汇安联国际B座10楼1043室</text>
            </view>
            <view class="u-flex">
                <view class="add-name">张女士</view>
                <view class="add-tel">13100001111</view>
            </view>
        </view>
        
        <view class="box u-p-t-30 u-p-b-30">
            <!-- <view class="item" v-for="(item, index) in data.goods" :key="index">
                <image :src="item.image_uri" class="del-07"></image>
                <view class="item-r">
                    <view class="goods-name u-line-2">{{item.goods_name}}</view>
                    <view class="u-flex u-p-t-40">
						<image src="../../static/icon/point_2.png" class="point-icon"></image>
                        <view class="price">{{item.point_price}}</view>
                    </view>
                </view>
            </view> -->
			
			<view class="item">
				<image src="../../static/del/5.png" class="del-07"></image>
			    <view class="item-r">
			        <view class="goods-name u-line-2">
						名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称
					</view>
			        <view class="u-flex u-p-t-40">
						<image src="../../static/icon/point_2.png" class="point-icon"></image>
			            <view class="price">600</view>
			        </view>
			    </view>
			</view>
			<view class="freight">
				<view>运费</view>
				<view>包邮</view>
			</view>
            <view class="total">
                <view class="u-font-24 u-p-r-10">小计</view>
                <image src="../../static/icon/point_1.png" class="point-icon"></image>
                <view class="total-price-num">{{data.PointPrice}}</view>
            </view>
        </view>
        <view class="box u-p-t-30 u-p-b-30 u-flex u-row-between u-col-center">
            <view>备注</view>
            <view class="u-flex u-row-right u-flex-1">
                <view class="remark">{{remark || '请添加备注'}}</view>
            </view>
        </view>
		<!-- 订单信息 -->
		<view class="box u-p-t-30 u-p-b-15">
		    <view class="o-item">
		        <view class="o-item-left">订单编号</view>
		        <view class="o-item-right">
		            <view class="num">{{ data.order_no }}</view>
		            <view class="copy" @click="copy(data.order_no)">复制</view>
		        </view>
		    </view>
		    <view class="o-item">
		        <view class="o-item-left">下单时间</view>
		        <view class="o-item-right">{{ data.create_time_date }}</view>
		    </view>
			<view class="o-item">
			    <view class="o-item-left">发货时间</view>
			    <view class="o-item-right">2021-12-12 11:02</view>
			</view>
			<view class="o-item">
			    <view class="o-item-left">收货时间</view>
			    <view class="o-item-right">2021-12-16 11:02</view>
			</view>
		</view>
		
        <!-- 底部 -->
        <view class="footer">
            <view class="footer-btn" @click="$noMultipleClicks(addOrder)">确认收货</view>
        </view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                noClick:true,//连点
                data: {},
            };
        },
        onLoad(option) {
            
        },
        methods: {
            getData() {
            	this.$ajax('order_detail', {
            		userToken: this.$getSync('userToken'),
                    id: this.id,//订单编号
            	}).then(ret => {
            		if (ret.status == 0) {
            			this.data = ret.data
                        this.isShow = true
            		} else {
            			this.$toast(ret.message);
            		}
            	});
            },
			
            //复制订单编号
            copy(order_no) {
                uni.setClipboardData({
                    data: order_no,
                    success: function() {
                        console.log('success');
                    }
                });
            },
        }
    };
</script>

<style lang="scss">
	
	
    
    
    page{
        background-color: #f5f5f5;
    }
    .content {
    	padding: 50rpx 20rpx 200rpx;
    }
    
    .bg {
    	width: 100%;
    	height: 390rpx;
    	position: absolute;
    	top: 0;
    	left: 0;
    	z-index: -1;
    	background: linear-gradient(to bottom, #2658aa, #f5f5f5);
    }
    .top{
        background-color: #fff;
        border-radius: 20rpx;
		padding: 40rpx 25rpx;
        margin-bottom: 20rpx;
    }
    
    .add-text{
        padding-bottom: 10rpx;
    }
    .add-icon{
        vertical-align: middle;
        padding: 4rpx 12rpx;
        font-size: 18rpx;
        color: #fff;
        background-color: #f76d0a;
        border-radius: 6rpx;
        margin-right: 10rpx;
    }
    .add{
        vertical-align: middle;
        font-size: 36rpx;
        font-weight: bold;
    }
    .add-name{
        color: #8a8a8a;
        font-size: 28rpx;
        max-width: 380rpx;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .add-tel{
        color: #8a8a8a;
        font-size: 28rpx;
        padding-left: 30rpx;
    }
    
    .border-r{
        border-right: 2rpx solid #e6e6e6;
    }
    
    
    .box{
        background-color: #fff;
        border-radius: 20rpx;
        margin-bottom: 20rpx;
        padding: 0 25rpx;
    }
    .item{
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30rpx;
    }
    .del-07{
        width: 160rpx;
        height: 160rpx;
        border-radius: 10rpx;
        border: 2rpx solid #e6e6e6;
        margin-right: 15rpx;
    }
    .goods-name{
        font-size: 28rpx;
        font-weight: bold;
        width: 480rpx;
        // white-space: nowrap;
        // overflow: hidden;
        // text-overflow: ellipsis;
        // padding-bottom: 40rpx;
    }
    .price{
        // color: #f62a2a;
        font-size: 36rpx;
        font-weight: bold;
    }
    .point-icon{
        width: 18rpx;
        height: 18rpx;
        margin-right: 10rpx;
    }
    .total{
        padding-top: 30rpx;
        border-top: 2rpx solid #e6e6e6;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    .total-price{
        color: #f62a2a;
        font-size: 26rpx;
    }
    .total-price-num{
        color: #f62a2a;
        font-size: 42rpx;
        font-weight: bold;
    }
    
    .remark{
        width: 570rpx;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .arrow-r-02{
        width: 12rpx;
        height: 20rpx;
        margin-left: 10rpx;
    }
	
	.o-item{
	    display: flex;
	    justify-content: flex-start;
	    align-items: center;
	    font-size: 24rpx;
	    padding-bottom: 15rpx;
	}
	.o-item-left{
	    padding-right: 25rpx
	}
	.o-item-right{
	    display: flex;
	    justify-content: space-between;
	    align-items: center;
	    flex: 1;
	}
	.num{
	    width: 425rpx;
	    word-break: break-all;
	    white-space: pre-line;
	}
	.copy{
	    width: 92rpx;
	    height: 45rpx;
	    color: #d39f78;
	    font-size: 22rpx;
	    border: 2rpx solid #d39f78;
	    border-radius: 50rpx;
	    text-align: center;
	    line-height: 45rpx;
	}
	
	.freight{
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding-bottom: 25rpx;
		font-size: 26rpx;
	}
    
    .footer{
        width: 100vw;
        position: fixed;
        bottom: 0;
        left: 0;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 15rpx 20rpx;
        background-color: #fff;
    }
    .footer-price-num{
        // color: #f62a2a;
        font-size: 42rpx;
        font-weight: bold;
    }
    .footer-btn{
        font-size: 28rpx;
		color: #f76d0a;
		border: 2rpx solid #f76d0a;
        padding: 12rpx 24rpx;
        margin-left: 20rpx;
        border-radius: 50rpx;
        box-sizing: border-box;
    }
    

</style>
